package com.hades.example.java.refactoring.before.c10.c10_12_replace_constructor_with_factory_method._1;

public class Employee {
    private int _type;
    static final int ENGINEER = 0;
    static final int SALES_MAN = 1;
    static final int MANAGER = 2;

    public Employee(int type) {
        _type = type;
    }

    public int maxNum() {
        if (_type == ENGINEER) {
            return 10;
        }
        if (_type == SALES_MAN) {
            return 20;
        }

        if (_type == MANAGER) {
            return 30;
        }
        return 10;
    }
}